<?php 
session_start();
 
include_once("../c/config.php");
$mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
if (!$mysqli->set_charset("utf8")) {printf("Error loading character set utf8: %s\n", $mysqliTwo->error);}

$ntQu=[
    '启东市',
    '如东县',
    '如皋市',
    '崇川区',
    '市直代管',
    '开发区代管',
    '海安市',
    '海门市',
    '港闸区',
    '通州区',
    '通州湾江海联动开发示范区'
];

foreach ($ntQu as $v){
    $sql="SELECT COUNT(id) as count FROM `u3` WHERE `fxqu` LIKE '".$v."' ORDER BY `szqu` DESC";
    $query=$mysqli->query($sql);
    $getData=$query->fetch_assoc();
    echo $v,': ',$getData['count'];
    echo "<br />";
}

echo "<br /><br /><br /><br />";
$shQu=[
    '杨浦区',
    '金山区',
    '七宝小学联合体',
    '宝山区',
    '嘉定区',
    '徐汇区',
    '普陀区',
    '松江区',
    '浦东新区',
    '奉贤区',
    '崇明区',
    '虹口区',
    '长宁区',
    '闵行区',
    '青浦区',
    '静安区',
    '黄浦区'
];
foreach ($shQu as $v){
    $sql="SELECT COUNT(id) as count FROM `u3` WHERE `fxqu` LIKE '".$v."' ORDER BY `szqu` DESC";
    $query=$mysqli->query($sql);
    $getData=$query->fetch_assoc();
    echo $v,': ',$getData['count'];
    echo "<br />";
}

$mysqli->close();
	
 